//
// Created by ole on 24-8-17.
//

#ifndef TOPIC_H
#define TOPIC_H
#include <string>
#include <utility>


class Topic {
public:
    explicit Topic(std::string action): action(std::move(action)) {
    }

    const std::string &getAction() const {
        return action;
    }

    bool operator==(const Topic &other) const {
        return action == other.action;
    }

private:
    const std::string action;
};

template<>
struct std::hash<Topic> {
    std::size_t operator()(const Topic &k) const noexcept {
        return std::hash<std::string>()(k.getAction());
    }
};

#endif //TOPIC_H
